<?php


namespace app\admin\controller;


use app\BaseController;

class Upload extends BaseController
{
    public function index()
    {

        $file = request()->file('file');  //input name=image
        //要上传文件的临时路径

        $filePath = $_FILES['file']['tmp_name'];
        return $this->success(ossUpload($filePath));
    }
}


